﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Guoc.BigMall.Infrastructure.Payment;
using Guoc.BigMall.Web.Services;
using Newtonsoft.Json;

namespace Guoc.BigMall.Web.Controllers
{
    public class HomeController : Controller
    {
        // GET: Home
        public ActionResult Index()
        {
            PayRequest req = new PayRequest();
            req.method = "wechat.unitified.trade";
            req.Add("Environment.CurrentDirectory", Environment.CurrentDirectory);
            req.Add("AppDomain.CurrentDomain.BaseDirectory", AppDomain.CurrentDomain.BaseDirectory);
            req.Add("timestamp", DateTime.Now.Ticks);
            req.Add("ip", Request.UserHostAddress);
            req.Add("HttpContext.Current.Request.PhysicalApplicationPath", Request.PhysicalApplicationPath);
            
            return new JsonNetResult(req);
        }
    }
}